/*
day142
2020.1.17
*/
#include<unordered_map>
#include<vector>
#include<iostream>
using namespace std;

class Solution {
public:
    int distributeCandies(vector<int>& candies) 
	{
        unordered_map<int,int> m;
        for(int i=0;i<candies.size();i++)	m[candies[i]]++;
        if(m.size()>=candies.size()/2)	return candies.size() / 2;
        else	return m.size();
    }
};


int main()
{
	return 0;
}
